package com.hzdl.house_mgr.mapper;

import com.hzdl.house_mgr.bean.Admin;
import com.hzdl.house_mgr.bean.BaseStat;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AdminMapper {

    Admin login(Admin admin);

    int insertAdmin(Admin admin);

    int deleteAdminById(Integer adminId);

    int updateAdmin(Admin admin);

    /*重置密码*/
    int resetAdminPwd(Integer adminId);

    /**
     * 查询用户
     */
    List<Admin> findAdminByWhere(Admin admin);

    Integer getCountByWhere(Admin admin);

    int delRoleAdminByAdminId(Integer id);
    int insRoleAdminByAdminId(@Param("adminId") Integer adminId , @Param("rids") Integer[] rids);

    List<BaseStat> yearSoleJson(String year);
}
